<?php
			
	class UserController extends ApplicationController {

		
		function index(){

		}
			
		
		public function ingreso(){			
		}
		
		public function autenticar(){
			$usuario=stripcslashes($this->request("usuario"));
			$password=md5($this->request("password"));			
			$auth = new Auth("model", "class: Login", "login: $usuario", "pwd: $password"); 
			  if ($auth->authenticate()){
			     Flash::success("Correcto");
			     return $this->redirect("inicio/");
			  } else {
			  	Flash::success("Fall&oacute;"); 
			     return $this->redirect("/");
			  } 		
		}

	}
	
?>
